package org.smartcti.freeswitch.util.internal;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import org.apache.commons.beanutils.Converter;

public class CustomerDateConverter implements Converter {
	 private final static SimpleDateFormat DATE_FORMATE_SHOW = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

	public Object convert(Class type, Object value) {
		 if (type.equals(java.util.Date.class) ) {
             try {
                 return DATE_FORMATE_SHOW.parse(value.toString());
             } catch (ParseException e) {
                 e.printStackTrace();
             }
      }
      return null;
	}

}
